<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/1/8
 * Time: 18:03
 * File: function.array-values.php
 * Project: PHPTEST
 * Location: Wuxi
 */

//array_values — 返回数组中所有的值
//array array_values ( array $input )

$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));

$a = array(
    3 => 11,
    1 => 22,
    2 => 33,
);
$a[0] = 44;

print_r( array_values( $a ));
//Array
//(
//    [0] => 11
//    [1] => 22
//    [2] => 33
//    [3] => 44
//)
